/**
 * Created by PC on 2016/1/18.
 */
class TestComponent extends BaseView {

    public sprite:egret.Sprite;

    public constructor(){
        super();
        this.sprite = new egret.Sprite();
        this.addChild(this.sprite);
    }

    public onInitialize():void {
        this.sprite.touchEnabled = true;
        this.sprite.graphics.clear();
        this.sprite.graphics.beginFill(0x000000,0.3);
        this.sprite.graphics.drawRect(0,0,500,500);
        this.sprite.graphics.endFill();
        this.sprite.width = 500;
        this.sprite.height = 500;
        this.disposer.addEventListener(this.sprite,egret.TouchEvent.TOUCH_BEGIN,this.onTouchBegin,this);
    }

    private onTouchBegin():void {
        console.log("onTouch");
    }

}